package com.cdtye.shuoh.config.websocket.event;

import org.springframework.context.ApplicationEvent;

public class MessageEvent extends ApplicationEvent {
    private String msg;

    private String deviceId;
    /**
     * Create a new {@code ApplicationEvent}.
     *
     * @param source the object on which the event initially occurred or with
     *               which the event is associated (never {@code null})
     */
    public MessageEvent(Object source) {
        super(source);
    }

    public MessageEvent(Object source, String msg) {
        super(source);
        this.msg = msg;
    }

    public MessageEvent(Object source,String deviceId,String msg){
        super(source);
        this.deviceId = deviceId;
        this.msg = msg;

    }

    public String getMsg(){
        return msg;
    }

    public String getDeviceId(){
        return deviceId;
    }

    public void setMsg(String msg){
        this.msg = msg;
    }

    public void setDeviceId(String deviceId){
        this.deviceId = deviceId;
    }
}
